import axios from "axios";
//设置请求头
let instance = axios.create({
  baseURL:"http://localhost:3000"
})

//配置请求拦截和响应的拦截
instance.interceptors.request.use(function(config){
  return config;
},function (error) {
  return Promise.reject(error);
});


instance.interceptors.response.use(function(response){
  return response.data;
},function(error){
  return Promise.reject(error);
});
export default instance;